Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: seperate solving from installing #1030

Merged
merged 12 commits into from
Sep 6, 2024

Conversation

baszalmstra
Copy link
Contributor

@baszalmstra baszalmstra commented Aug 23, 2024

This PR splits solving the dependencies from the installation of the environments. This can make --render-only much faster because no installation is needed.

Determining the run_exports is still part of solving. The packages are still downloaded and extracted to get the run_exports (that's an improvement for later). The PackageCache is now shared which ensures that validation/download/extract is not duplicated (which was previously the case).

The gateway is also shared between all runs to reduce overhead.

I also removed storing a number of CLI arguments in Configuration. These didnt make sense to me to store in the configuration and instead could better be passed as arguments to the functions that require them.

However, currently the download progress of packages is lost. I wanna fix this before we merge.

@baszalmstra
Copy link
Contributor Author

I also added fancy progress now:

image

@baszalmstra baszalmstra marked this pull request as ready for review August 24, 2024 11:12
@baszalmstra
Copy link
Contributor Author

This is now passing CI and ready for a review! @wolfv !


// use the configured style
if let Some(template) = &self.progress_template {
progress_bar.set_style(template.clone());
}

// progress_bar.enable_steady_tick(Duration::from_millis(100));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep or remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// progress_bar.enable_steady_tick(Duration::from_millis(100));

@wolfv
Copy link
Member

wolfv commented Sep 6, 2024

Functionality is great! I am happy to merge. The only thing I found when testing is that the indent doesn't seem to be quite correct (screenshot attached).

Maybe we should start a new tracing span that says "installing environments"?

Screenshot 2024-09-06 at 09 18 49

@wolfv
Copy link
Member

wolfv commented Sep 6, 2024

Also the bar from download & extract doesn't "go away" (but that's also a super minor thing).

@baszalmstra
Copy link
Contributor Author

I think I fixed that the progress bars are now removed. The indentation is correct because there normally (before it finishes) is another progress bar above it. See the screenshot here.

@wolfv wolfv merged commit 9f11a5f into prefix-dev:main Sep 6, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants